package MyUtils;

import java.util.Scanner;

/**
 * 输入 Scanner 工具类
 */
public class ScanUtil {
    /*
        4
        1 2 3 5
    */
    public static class N_NUMS{
        public int n;
        public int[] nums;
        public N_NUMS(int n, int[] nums){
            this.n = n;
            this.nums = nums;
        }
    }
    public static N_NUMS n_enter_nums(String splitStr){
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.nextLine());// 只可用line 不可用Int

        String[] s = sc.nextLine().split(splitStr);
        int[] nums = new int[s.length];
        for (int i = 0; i < s.length; i++) {
            nums[i] = Integer.parseInt(s[i]);
        }

        return new N_NUMS(n, nums);
    }
}
